package sseGameApps.meta.mdkbr;

//@javax.annotation.Generated(value = { "slim3-gen", "@VERSION@" }, date = "2013-09-28 20:36:49")
/** */
public final class MdKanjiMeta extends org.slim3.datastore.ModelMeta<sseGameApps.model.mdkbr.MdKanji> {

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer> attackPoint = new org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer>(this, "attackPoint", "attackPoint", java.lang.Integer.class);

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer> barPoint = new org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer>(this, "barPoint", "barPoint", java.lang.Integer.class);

    /** */
    public final org.slim3.datastore.StringUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji> descText = new org.slim3.datastore.StringUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji>(this, "descText", "descText");

    /** */
    public final org.slim3.datastore.StringAttributeMeta<sseGameApps.model.mdkbr.MdKanji> firstSummonUser = new org.slim3.datastore.StringAttributeMeta<sseGameApps.model.mdkbr.MdKanji>(this, "firstSummonUser", "firstSummonUser");

    /** */
    public final org.slim3.datastore.StringAttributeMeta<sseGameApps.model.mdkbr.MdKanji> kanjiType = new org.slim3.datastore.StringAttributeMeta<sseGameApps.model.mdkbr.MdKanji>(this, "kanjiType", "kanjiType");

    /** */
    public final org.slim3.datastore.StringUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji> kanjiTypeText = new org.slim3.datastore.StringUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji>(this, "kanjiTypeText", "kanjiTypeText");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, com.google.appengine.api.datastore.Key> key = new org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, com.google.appengine.api.datastore.Key>(this, "__key__", "key", com.google.appengine.api.datastore.Key.class);

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer> level = new org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer>(this, "level", "level", java.lang.Integer.class);

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer> mojiNo = new org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer>(this, "mojiNo", "mojiNo", java.lang.Integer.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<sseGameApps.model.mdkbr.MdKanji> mojiText = new org.slim3.datastore.StringAttributeMeta<sseGameApps.model.mdkbr.MdKanji>(this, "mojiText", "mojiText");

    /** */
    public final org.slim3.datastore.StringUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji> rubiText = new org.slim3.datastore.StringUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji>(this, "rubiText", "rubiText");

    /** */
    public final org.slim3.datastore.CoreUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer> summonCount = new org.slim3.datastore.CoreUnindexedAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Integer>(this, "summonCount", "summonCount", java.lang.Integer.class);

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Long> version = new org.slim3.datastore.CoreAttributeMeta<sseGameApps.model.mdkbr.MdKanji, java.lang.Long>(this, "version", "version", java.lang.Long.class);

    private static final MdKanjiMeta slim3_singleton = new MdKanjiMeta();

    /**
     * @return the singleton
     */
    public static MdKanjiMeta get() {
       return slim3_singleton;
    }

    /** */
    public MdKanjiMeta() {
        super("MdKanji", sseGameApps.model.mdkbr.MdKanji.class);
    }

    @Override
    public sseGameApps.model.mdkbr.MdKanji entityToModel(com.google.appengine.api.datastore.Entity entity) {
        sseGameApps.model.mdkbr.MdKanji model = new sseGameApps.model.mdkbr.MdKanji();
        model.setAttackPoint(longToInteger((java.lang.Long) entity.getProperty("attackPoint")));
        model.setBarPoint(longToInteger((java.lang.Long) entity.getProperty("barPoint")));
        model.setDescText((java.lang.String) entity.getProperty("descText"));
        model.setFirstSummonUser((java.lang.String) entity.getProperty("firstSummonUser"));
        model.setKanjiType((java.lang.String) entity.getProperty("kanjiType"));
        model.setKanjiTypeText((java.lang.String) entity.getProperty("kanjiTypeText"));
        model.setKey(entity.getKey());
        model.setLevel(longToInteger((java.lang.Long) entity.getProperty("level")));
        model.setMojiNo(longToInteger((java.lang.Long) entity.getProperty("mojiNo")));
        model.setMojiText((java.lang.String) entity.getProperty("mojiText"));
        model.setRubiText((java.lang.String) entity.getProperty("rubiText"));
        model.setSummonCount(longToInteger((java.lang.Long) entity.getProperty("summonCount")));
        model.setVersion((java.lang.Long) entity.getProperty("version"));
        return model;
    }

    @Override
    public com.google.appengine.api.datastore.Entity modelToEntity(java.lang.Object model) {
        sseGameApps.model.mdkbr.MdKanji m = (sseGameApps.model.mdkbr.MdKanji) model;
        com.google.appengine.api.datastore.Entity entity = null;
        if (m.getKey() != null) {
            entity = new com.google.appengine.api.datastore.Entity(m.getKey());
        } else {
            entity = new com.google.appengine.api.datastore.Entity(kind);
        }
        entity.setProperty("attackPoint", m.getAttackPoint());
        entity.setProperty("barPoint", m.getBarPoint());
        entity.setUnindexedProperty("descText", m.getDescText());
        entity.setProperty("firstSummonUser", m.getFirstSummonUser());
        entity.setProperty("kanjiType", m.getKanjiType());
        entity.setUnindexedProperty("kanjiTypeText", m.getKanjiTypeText());
        entity.setProperty("level", m.getLevel());
        entity.setProperty("mojiNo", m.getMojiNo());
        entity.setProperty("mojiText", m.getMojiText());
        entity.setUnindexedProperty("rubiText", m.getRubiText());
        entity.setUnindexedProperty("summonCount", m.getSummonCount());
        entity.setProperty("version", m.getVersion());
        entity.setProperty("slim3.schemaVersion", 1);
        return entity;
    }

    @Override
    protected com.google.appengine.api.datastore.Key getKey(Object model) {
        sseGameApps.model.mdkbr.MdKanji m = (sseGameApps.model.mdkbr.MdKanji) model;
        return m.getKey();
    }

    @Override
    protected void setKey(Object model, com.google.appengine.api.datastore.Key key) {
        validateKey(key);
        sseGameApps.model.mdkbr.MdKanji m = (sseGameApps.model.mdkbr.MdKanji) model;
        m.setKey(key);
    }

    @Override
    protected long getVersion(Object model) {
        sseGameApps.model.mdkbr.MdKanji m = (sseGameApps.model.mdkbr.MdKanji) model;
        return m.getVersion() != null ? m.getVersion().longValue() : 0L;
    }

    @Override
    protected void assignKeyToModelRefIfNecessary(com.google.appengine.api.datastore.AsyncDatastoreService ds, java.lang.Object model) {
    }

    @Override
    protected void incrementVersion(Object model) {
        sseGameApps.model.mdkbr.MdKanji m = (sseGameApps.model.mdkbr.MdKanji) model;
        long version = m.getVersion() != null ? m.getVersion().longValue() : 0L;
        m.setVersion(Long.valueOf(version + 1L));
    }

    @Override
    protected void prePut(Object model) {
    }

    @Override
    protected void postGet(Object model) {
    }

    @Override
    public String getSchemaVersionName() {
        return "slim3.schemaVersion";
    }

    @Override
    public String getClassHierarchyListName() {
        return "slim3.classHierarchyList";
    }

    @Override
    protected boolean isCipherProperty(String propertyName) {
        return false;
    }

    @Override
    protected void modelToJson(org.slim3.datastore.json.JsonWriter writer, java.lang.Object model, int maxDepth, int currentDepth) {
        sseGameApps.model.mdkbr.MdKanji m = (sseGameApps.model.mdkbr.MdKanji) model;
        writer.beginObject();
        org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
        if(m.getAttackPoint() != null){
            writer.setNextPropertyName("attackPoint");
            encoder0.encode(writer, m.getAttackPoint());
        }
        if(m.getBarPoint() != null){
            writer.setNextPropertyName("barPoint");
            encoder0.encode(writer, m.getBarPoint());
        }
        if(m.getDescText() != null){
            writer.setNextPropertyName("descText");
            encoder0.encode(writer, m.getDescText());
        }
        if(m.getFirstSummonUser() != null){
            writer.setNextPropertyName("firstSummonUser");
            encoder0.encode(writer, m.getFirstSummonUser());
        }
        if(m.getKanjiType() != null){
            writer.setNextPropertyName("kanjiType");
            encoder0.encode(writer, m.getKanjiType());
        }
        if(m.getKanjiTypeText() != null){
            writer.setNextPropertyName("kanjiTypeText");
            encoder0.encode(writer, m.getKanjiTypeText());
        }
        if(m.getKey() != null){
            writer.setNextPropertyName("key");
            encoder0.encode(writer, m.getKey());
        }
        if(m.getLevel() != null){
            writer.setNextPropertyName("level");
            encoder0.encode(writer, m.getLevel());
        }
        if(m.getMojiNo() != null){
            writer.setNextPropertyName("mojiNo");
            encoder0.encode(writer, m.getMojiNo());
        }
        if(m.getMojiText() != null){
            writer.setNextPropertyName("mojiText");
            encoder0.encode(writer, m.getMojiText());
        }
        if(m.getRubiText() != null){
            writer.setNextPropertyName("rubiText");
            encoder0.encode(writer, m.getRubiText());
        }
        if(m.getSummonCount() != null){
            writer.setNextPropertyName("summonCount");
            encoder0.encode(writer, m.getSummonCount());
        }
        if(m.getVersion() != null){
            writer.setNextPropertyName("version");
            encoder0.encode(writer, m.getVersion());
        }
        writer.endObject();
    }

    @Override
    protected sseGameApps.model.mdkbr.MdKanji jsonToModel(org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
        sseGameApps.model.mdkbr.MdKanji m = new sseGameApps.model.mdkbr.MdKanji();
        org.slim3.datastore.json.JsonReader reader = null;
        org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
        reader = rootReader.newObjectReader("attackPoint");
        m.setAttackPoint(decoder0.decode(reader, m.getAttackPoint()));
        reader = rootReader.newObjectReader("barPoint");
        m.setBarPoint(decoder0.decode(reader, m.getBarPoint()));
        reader = rootReader.newObjectReader("descText");
        m.setDescText(decoder0.decode(reader, m.getDescText()));
        reader = rootReader.newObjectReader("firstSummonUser");
        m.setFirstSummonUser(decoder0.decode(reader, m.getFirstSummonUser()));
        reader = rootReader.newObjectReader("kanjiType");
        m.setKanjiType(decoder0.decode(reader, m.getKanjiType()));
        reader = rootReader.newObjectReader("kanjiTypeText");
        m.setKanjiTypeText(decoder0.decode(reader, m.getKanjiTypeText()));
        reader = rootReader.newObjectReader("key");
        m.setKey(decoder0.decode(reader, m.getKey()));
        reader = rootReader.newObjectReader("level");
        m.setLevel(decoder0.decode(reader, m.getLevel()));
        reader = rootReader.newObjectReader("mojiNo");
        m.setMojiNo(decoder0.decode(reader, m.getMojiNo()));
        reader = rootReader.newObjectReader("mojiText");
        m.setMojiText(decoder0.decode(reader, m.getMojiText()));
        reader = rootReader.newObjectReader("rubiText");
        m.setRubiText(decoder0.decode(reader, m.getRubiText()));
        reader = rootReader.newObjectReader("summonCount");
        m.setSummonCount(decoder0.decode(reader, m.getSummonCount()));
        reader = rootReader.newObjectReader("version");
        m.setVersion(decoder0.decode(reader, m.getVersion()));
        return m;
    }
}